<? include ("../init.php") ?>
<? include ("../header.php") ?>
<? include ("../menu.php") ?>
<? include ("submenu.php") ?>

<div id = "body">

<h1><?_l('Member')?></h1>

<div class = "page">
<?
  $count = $db->countOfAll('hs_member');
  $start = setpage($count);
?>
</div>
<!--<a href = "form.php" class = "add"><img src = "<?=ADMIN?>/images/icon-add.png">&nbsp;&nbsp;&nbsp;<?_l('Add Member')?></a>-->

<div class = "clear"></div>

<table cellpadding = "0" cellspacing = "0" border = "0" class ="list">
  <th scope="col"><?_l('name')?></th>
  <th scope="col"><?_l('lastname')?></th>
  <th scope="col"><?_l('level')?></th>
  <th scope="col"><?_l('company')?></th>
  <th scope="col"><?_l('email')?></th>
  <th scope="col"><?_l('phone')?></th>
  <th scope="col"><?_l('newsletter')?></th>
  <th scope="col"><?_l('status')?></th>
  
  <th scope="col"><?_l('edit')?></th>
  <th scope="col"><?_l('delete')?></th>

<?
  $rss = $db->query("SELECT * FROM hs_member LIMIT $start,".PAGE);
  while ($line = $db->fetchNextObject($rss)){
    $line->m_confirm?$status='Confirmed':$status='Un Confirm';
    $line->m_enews?$m_enews='YES':$m_enews='NO';
    ($line->m_level==1)?$level='General':$level='Gold';
?>
  <tr>
    <td><?=$line->m_name?></td>
    <td><?=$line->m_lastname?></td>
    <td><?=$level?></td>
    <td><?=$line->m_company?></td>
    <td><?=$line->m_email?></td>
    <td><?=$line->m_phone?></td>
    <td><?=$m_enews?></td>
    <td><?=$status?></td>
    
    <td><a href = "edit.php?m_id=<?=$line->m_id?>" class = "btn"><?_l('edit')?></a></td>
    <td><a href = "del.php?m_id=<?=$line->m_id?>" class = "btn"><?_l('delete')?></a></td>
  </tr>
<?
  }
?>
</table>

</div>

<style>
#event{
  margin:0 0 0 20px;
}
</style>

<? include "../footer.php" ?>